<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>人员部门分配</title>
<link rel="icon" href="favicon.ico" type="image/ico">


<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
  
<body data-logobg="color_8" data-sidebarbg="color_8">
<div class="layout-web">
  <div class="layout-container">

	  <%--导航栏--%>
	  <c:import url="nav.jsp"></c:import>
    
    <!--页面主要内容-->
    <main class="layout-content">
      
      <div class="container-fluid">
        
        <div class="col-md-12">
        	<div class="card">
        			<div class="card-header"><h4>人员部门分配</h4></div>
        			<div class="card-body">
        				<form class="form-horizontal" action="emprole.action" method="post">
							<input name="eid" type="hidden" value="${emp.eid}">
							<input name="ridhidden" type="hidden" value="${emp.rid}">
							<input name="type" type="hidden" value="2">
	                  <div class="form-group">
	                    <label class="col-xs-12" for="example-text-input">用户名</label>
	                    <div class="col-xs-12">
	                      <input class="form-control" type="text" id="example-text-input" name="example-text-input" value="${emp.ename}" readonly="readonly">
	                    </div>
	                  </div>
	                  <div class="form-group">
	                    <label class="col-xs-12">部门</label>
	                    <div class="col-xs-12">
							<input class="form-control" type="text" value="${emp.did}" readonly="readonly"/>
	                    </div>
	                  </div>
	                  <div class="form-group">
	                    <label class="col-xs-12">人员角色</label>
	                    <div class="col-xs-12">
							<select id="rid" name="rid" class="form-control">
								<c:forEach var="role" items="${rolelist}">
									<option value="${role.rid}">${role.rname}</option>
								</c:forEach>
							</select>
	                    </div>
	                  </div>
	                  <div class="form-group">
	                    <div class="col-xs-12">
	                      <button class="btn btn-success" type="submit">分配角色</button>
	                    </div>
	                  </div>
	                </form>
        			</div>
        	</div>
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script>
	$(function (){
		var ridhidden=$("#ridhidden").val();
		$("#rid").val(ridhidden);
	})
</script>
</body>
</html>